<div>
  <div id="source-container">
    <div id="nav">
      <div id="navheader">
        <div id="projectname" title="{{project.description}}">{{project.name}}</div>
        <div class="dropdown"><a ng-click="project_context_menu($event)">…</a></div>
      </div>
      <div id="filelist">
        <div id="file-{{$index}}" class="fileentry"
             ng-click="select_file(file)"
             ng-class="{selected: file == current_file}"
             ng-repeat="file in files">
          <div class="filename">{{file.name}} <i class="icon-asterisk dirtymarker" ng-show="file.dirty"></i></div>
          <div class="dropdown"><a ng-click="file_context_menu($event, file)">…</a></div>
        </div>
        <div class='newthing' ng-click='prompt_new_file()'>+ new file</div>
      </div>
    </div>

    <div id="source-filename">
      <button ng-click='run()' title='run {{project.name}}' class='btn btn-success'>&nbsp;<i class="icon-play"></i>&nbsp;</button>
      {{current_file.name}}
      <span class="filestatus" ng-bind="filestatus"></span>
    </div>
    <div ng-hide="is_image_mime_type(current_file.mime_type)" id="source-code"></div>
    <img ng-show="is_image_mime_type(current_file.mime_type)" ng-src="{{image_url_of(current_file)}}">
  </div>

<br>
<br>
  <hr resizer="source-container">

  <div id='output-container' class="hidden">
    <div class='form-inline'>
      <button ng-click='popout(); run()' class='btn'><i class="icon-resize-full"></i></button>
      <input ng-model='project.run_url' type='url' class='span10' ng-click='select_me($event)'>
    </div>
    <iframe id="output-iframe">
    </iframe>
    <hr resizer="output-iframe">
  </div>


  <!-- hidden bits -->
  <div id="file-context-menu" class="context-menu" ng-show="showfilecontextmenu">
    <div ng-click="prompt_file_rename()"><b>Rename</b> <code>{{current_file.name}}</code></div>
    <div ng-click="prompt_file_delete()"><b>Delete</b> <code>{{current_file.name}}</code></div>
  </div>
  <div id="project-context-menu" class="context-menu" ng-show="showprojectcontextmenu">
    <div ng-click="prompt_project_rename(project)"><b>Rename</b> {{project.name}}</div>
    <div ng-click="prompt_to_delete_project(project)"><b>Delete</b> {{project.name}}</div>
  </div>
</div>
